#pragma once

#include <vulkan/vulkan.hpp>

//渲染目标，仅供GPU进一步渲染使用
class CGPURenderTarget
{

public:
    CGPURenderTarget()= default;
    virtual ~CGPURenderTarget();

    void Initialize(vk::Extent3D InSize, vk::Format InFormat, vk::ImageUsageFlags InUsage);
    void Deinitialize();
    bool IsInitialized() { return (bool)Image; }

    vk::Image GetImage();
    vk::DeviceMemory GetMemory();
    vk::ImageView GetImageView();

    vk::Extent3D GetSize() { return Size; }
protected:
    vk::Image Image = VK_NULL_HANDLE;
	vk::DeviceMemory Memory = VK_NULL_HANDLE;
	vk::ImageView View = VK_NULL_HANDLE;



    //create info
    vk::Extent3D Size;
    vk::Format Format;
    vk::ImageUsageFlags Usage;



};